<?php include('_init_.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/admin-body.css" rel="stylesheet" type="text/css" />
<link href="../css/admin-menber.css" rel="stylesheet" type="text/css" />
<link href="../css/loader.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="../js/loader.js"></script>
<script type="text/javascript">

function deleteMember(mem_id)
{
	if ( !confirm('確定刪除？')) {
		return false;
	}
	var api_url = 'menber-out.php?act=ajax_delete&id='+mem_id;
	   
	   show_ajax_loader();
	   $.get(api_url, function(data){
		   	hide_ajax_loader();
		     if ( data == 'ok'){
			     document.location = 'menber-out.php';
		     }
		   });
	    

}
function setRevert(mem_id)
{
	
	var api_url = 'menber-out.php?act=ajax_set_revert&id='+mem_id;

	   show_ajax_loader();
	   $.get(api_url, function(data){
		   	hide_ajax_loader();
		     if ( data == 'ok'){
			     document.location = 'menber-out.php';
		     }
		   });
	    

	return false;
}
</script>
<title>班尼頓寫真後台管理</title>
</head>

<body>
<?php include_once('admin-top.php');?>
<div id="main" class="clearfix"><!-- star #main //-->
  <?php include_once('sub-menber.php');?>
  <div id="contactall"><!-- star #main //-->
  <div id="tit" ><!-- star #tit //-->
    <ul>
    <li class="tit-a">會員列表</li>
    <li class="tit-b"></li>
    </ul>
  </div><!-- end #tit //-->
  <div id="contact" class="clearfix" ><!-- star #contact //-->
  <?php foreach($GLOBALS['PAGE_LIST_DATA']  as $row):?>
   <ul>
  <li >編號：<?php printf("%09d",$row['id']);?></li>
  <li >帳號：<?php echo $row['email'];?></li>
  <li >暱稱：<?php echo $row['nick_name'];?></li>
  <li >大名：<?php echo $row['display_name'];?></li>
  <li >電話：<?php echo $row['phone'];?></li>
  <li >電子報訂閱：<?php echo $row['is_subscribe_epaper'] == 'Y'?'是':'不要訂閱';?></li>
   <li ><a href="#revert" onclick="return setRevert(<?php echo $row['id'];?>);">恢復</a> <a href="#delete" onclick="return deleteMember(<?php echo $row['id'];?>);">刪除</a></li>
  </ul>
   <?php endforeach;?>
 
  
  </div><!-- end #contact //-->
  <div id="page">
  <ul>
      <?php if ( $GLOBALS['PAGE_LIST_PAGE'] < $GLOBALS['PAGE_LIST_TOTAL_PAGE']):?>
    <li><a href="#" onclick="return next_page();">以前の &gt;</a> </li>
     <?php endif;?>
     
    <?php if ( $GLOBALS['PAGE_LIST_PAGE'] > 1):?>
    <li> <a href="#" onclick="return prev_page();"> &lt;次の </a> </li>
     <?php endif;?>
  </ul>
</div>
  </div><!-- end #contactall //-->
</div><!-- end #main //-->
<script type="text/javascript">
function next_page()
{
	var form = document.forms['form_filter'];
	form.page.value = parseInt(form.page.value,10) + 1;
	form.submit();
	return false;
}
function prev_page()
{
	var form = document.forms['form_filter'];
	form.page.value =  parseInt(form.page.value,10) - 1;
	form.submit();
	return false;
}
function set_filter_key_word(key_word)
{
	var form = document.forms['form_filter'];
	form.key_word.value =  key_word;
	form.submit();
	return false;
}
</script>
<form method="get" name="form_filter" action="<?php echo $_SERVER['PHP_SELF']?>">
<input type="hidden" name="page" value="<?php echo $_REQUEST['page'];?>"/>
<input type="hidden" name="key_word" value="<?php echo isset($_REQUEST['key_word'])?$_REQUEST['key_word']:'';?>"/>
</form>
</body>
</html>